package com.sunyur.tailor.channel.service.outer.keep.service.impl;

import cn.hutool.core.map.MapUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.sunyur.tailor.channel.common.inner.base.MsgResultCode;
import com.sunyur.tailor.channel.common.inner.base.SunyurResult;
import com.sunyur.tailor.channel.common.inner.util.SunyurClientUtil;
import com.sunyur.tailor.channel.common.inner.util.SunyurResultUtil;
import com.sunyur.tailor.channel.common.middle.base.ChannelListResult;
import com.sunyur.tailor.channel.common.middle.base.ChannelResult;
import com.sunyur.tailor.channel.common.middle.enums.MiddleResultEnum;
import com.sunyur.tailor.channel.common.middle.util.ChannelResultUtil;
import com.sunyur.tailor.channel.service.inner.findsource.model.FindSourceFixedInforHeadModel;
import com.sunyur.tailor.channel.service.inner.findsource.model.FindSourceFixedInforItemModel;
import com.sunyur.tailor.channel.service.inner.findsource.param.FindSourceInforParam;
import com.sunyur.tailor.channel.service.inner.findsource.service.SunyurFindSourceService;
import com.sunyur.tailor.channel.service.inner.purchase.service.SunyurPurchaseApplyService;
import com.sunyur.tailor.channel.service.outer.keep.param.SRMPurchaseFeishuForApprovalParam;
import com.sunyur.tailor.channel.service.outer.keep.service.KeepToFeishuService;
import com.sunyur.tailor.channel.service.outer.keep.service.WorkflowBusinessStrategyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 *
 */

@Service("auctionOrder")
@Slf4j
public class AuctionOrderStrategyImpl implements WorkflowBusinessStrategyService {

    @Autowired
    private SunyurFindSourceService service;

    @Autowired
    private SunyurClientUtil sunyurClient;
    @Value("${sunyur.api.findSourceFixedHead}")
    private String findSourceFixedHead;

    @Value("${sunyur.api.findSourceProjectList}")
    private String findSourceProjectList;

    @Value("${feishu.tenderOrder.approvalCode}")
    private String approvalCode;

    @Autowired
    private KeepToFeishuService keepToFeishuService;


    @Autowired
    private SunyurPurchaseApplyService sunyurPurchaseApplyService;

    @Autowired
    private InquireOrderStrategyImpl inquireOrderStrategy;


    @Override
    public ChannelResult start(MsgResultCode msgResultCode) {
        log.info("auctionOrder start  msgResultCode:{}", JSONObject.toJSONString(msgResultCode));
        return  inquireOrderStrategy.start(msgResultCode);
    }

}

